home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
asm
/
alib11b.zip
/
CODE1.ZIP
/
CMOS
/
CMOSREAD.ASM
< prev
next >
Wrap
Assembly Source File
|
1994-10-03
|
638b
|
36 lines
;----------------------------------------------------------------------------
; read_cmos - read cmos data
; inputs: al = address
; outputs: al = cmos data read
;
read_cmos:
pushf
rol al,1
stc
rcr al,1
cli
out 70h,al ;output address
nop
nop
nop
in al,71h ;read data port
push ax
mov al,1ah ;get default address
rcr al,1 ;add in nmi bit
out 70h,al ;select default loc
;
; dummy read for reported problem with PS/2 computers
;
in al,71h ;read cmos
sti
pop ax ;restore data read
push cs
call popf_sub
ret
;
; this code restores flags, and nmi state
;
popf_sub:
iret